#ifndef SAMPLE_MAIL_H
#define SAMPLE_MAIL_H

#include <QString>

#include <vector>
#include <ctime>

namespace sample {

	struct Date {
		tm time;
		int zone;
		QString zoneName;
	};

	struct RecvFromDomain {
		QString fristDomain;
		QString secondDomain;
		QString addrLiteral;
	};

	struct RecvByDomain {
		QString domain;
		QString protocal;
		QString msgID;
	};

	struct RecvField {
		RecvFromDomain fromDomain;
		RecvByDomain byDomain;
		QString addrLiteral;
		QString forField;
	};

	struct From {
		QString senderName;
		QString addrFrom;
	};

	struct To {
		QString receiverName;
		QString addrTo;
	};

	class Mail {
	public:
		void setFrom(const From& aFrom);
		void setTo(const To& aTo);
		void setDate(const Date& aDate);
		void setSubject(const QString& aSubject);
		void setBody(const QString& aBody);
		void setRecvField(const std::vector<RecvField>& aRecvFields);
		From getFrom();
		To getTo();
		Date getDate();
		QString getSubject();
		QString getBody();
		std::vector<RecvField> getRecvFields();
	private:
		From from;
		To to;
		Date date;
		QString subject;
		QString body;
		std::vector<RecvField> recvFields;
	};
}

#endif // SAMPLE_MAIL_H